import Vue from 'vue'
import '@babel/polyfill'
import 'normalize.css/normalize.css' // a modern alternative to CSS resets

import Element from 'element-ui'
import './styles/element-variables.scss'

import '@/styles/index.scss' // global css

import App from './App'
import store from './store'
import router from './router'

// import './icons' // icon
import './permission' // permission control

import * as filters from './filters' // global filters

// 阿里彩色图标
import './assets/iconfont.js'
// 引入svg组件
import IconSvg from '@/components/IconSvg'
// 全局注册icon-svg
Vue.component('icon-svg', IconSvg)

Vue.use(Element, {
  size: localStorage.getItem('size') || 'medium' // set element-ui default size
})

// register global utility filters
Object.keys(filters).forEach(key => {
  Vue.filter(key, filters[key])
})

Vue.config.productionTip = false

new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
